<!DOCTYPE html>
<html lang="zh-CN" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>路由 | 九州通物流</title>
    <meta name="description" content="Vite & Vue 驱动的静态站点生成器">
    <link rel="preload stylesheet" href="/assets/style.67ec958e.css" as="style">
    
    <script type="module" src="/assets/app.434eb1a6.js"></script>
    <link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/assets/chunks/framework.6167f762.js">
    <link rel="modulepreload" href="/assets/chunks/theme.fed2e9e6.js">
    <link rel="modulepreload" href="/assets/chunks/ComponentInHeader.3eef76ce.js">
    <link rel="modulepreload" href="/assets/chunks/ModalDemo.7f334039.js">
    <link rel="modulepreload" href="/assets/chunks/button.c8413dcd.js">
    <link rel="modulepreload" href="/assets/guide_routing.md.aed61575.lean.js">
    <link rel="icon" href="//logo.ico">
    <meta name="google-site-verification" content="Wzz07XeBKMnNRNwUcsw6hEgpGoTkggTxORUtLRm6rns">
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-5a346dfe><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5a346dfe data-v-ae24b3ad><div class="VPNavBar has-sidebar" data-v-ae24b3ad data-v-a0fd61f4><div class="container" data-v-a0fd61f4><div class="title" data-v-a0fd61f4><div class="VPNavBarTitle has-sidebar" data-v-a0fd61f4 data-v-86d1bed8><a class="title" href="/" data-v-86d1bed8><!--[--><!--]--><!--[--><img class="VPImage logo" src="/logo.ico" alt data-v-8426fc1a><!--]--><!--[-->云仓组件库<!--]--><!--[--><!--]--></a></div></div><div class="content" data-v-a0fd61f4><div class="curtain" data-v-a0fd61f4></div><div class="content-body" data-v-a0fd61f4><!--[--><!--]--><div class="VPNavBarSearch search" data-v-a0fd61f4><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg class="DocSearch-Search-Icon" width="20" height="20" viewBox="0 0 20 20" aria-label="search icon"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-a0fd61f4 data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/guide/what-is-vitepress" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>接入指南</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/examples/md/site-config" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>组件配置</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/versionLog/v1.0.2" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>版本日志</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-a0fd61f4 data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-e6aabb21 data-v-ce54a7d1 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-ce54a7d1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-ce54a7d1><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-a0fd61f4 data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/vanchKong/VitePressCN" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-f80f8133><svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-a0fd61f4 data-v-40855f84 data-v-9c007e85><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-9c007e85><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-9c007e85><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle><circle cx="5" cy="12" r="2"></circle></svg></button><div class="menu" data-v-9c007e85><div class="VPMenu" data-v-9c007e85 data-v-e7ea1737><!----><!--[--><!--[--><!----><div class="group" data-v-40855f84><div class="item appearance" data-v-40855f84><p class="label" data-v-40855f84>主题</p><div class="appearance-action" data-v-40855f84><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-40855f84 data-v-ce54a7d1 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-ce54a7d1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-ce54a7d1><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div></div></div><div class="group" data-v-40855f84><div class="item social-links" data-v-40855f84><div class="VPSocialLinks social-links-list" data-v-40855f84 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/vanchKong/VitePressCN" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-f80f8133><svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-a0fd61f4 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><!----></header><div class="VPLocalNav reached-top" data-v-5a346dfe data-v-79c8c1df><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-79c8c1df><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="menu-icon" data-v-79c8c1df><path d="M17,11H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,11,17,11z"></path><path d="M21,7H3C2.4,7,2,6.6,2,6s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,7,21,7z"></path><path d="M21,15H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,15,21,15z"></path><path d="M17,19H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,19,17,19z"></path></svg><span class="menu-text" data-v-79c8c1df>菜单</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-79c8c1df data-v-1c15a60a><button data-v-1c15a60a>回到顶部</button><!----></div></div><aside class="VPSidebar" data-v-5a346dfe data-v-b00e2fdd><div class="curtain" data-v-b00e2fdd></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-b00e2fdd><span class="visually-hidden" id="sidebar-aria-label" data-v-b00e2fdd> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-b00e2fdd><section class="VPSidebarItem level-0 collapsible has-active" data-v-b00e2fdd data-v-e31bd47b><div class="item" role="button" tabindex="0" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><h2 class="text" data-v-e31bd47b>介绍</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-e31bd47b><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="caret-icon" data-v-e31bd47b><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></div></div><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/what-is-vitepress" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>设计初衷</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/getting-started" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>使用安装</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/routing" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>快速开始</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/sitemap-generation" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>按需引入</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-b00e2fdd><section class="VPSidebarItem level-0 collapsible collapsed" data-v-b00e2fdd data-v-e31bd47b><div class="item" role="button" tabindex="0" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><h2 class="text" data-v-e31bd47b>本地开发</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-e31bd47b><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="caret-icon" data-v-e31bd47b><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></div></div><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/markdown-base" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>编写新组件</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/markdown" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>编写测试用例</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/asset-handling" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>编写API文档</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/frontmatter" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>修改版本号</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/using-vue" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>打包构建组件库</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/i18n" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>上传组件库到npm仓库</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/guide/i18n" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>更新组件文档</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-b00e2fdd><section class="VPSidebarItem level-0" data-v-b00e2fdd data-v-e31bd47b><!----><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/examples/md/site-config" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>组件示例 & API 参考</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5a346dfe data-v-669faec9><div class="VPDoc has-sidebar has-aside" data-v-669faec9 data-v-6b87e69f><!--[--><!--]--><div class="container" data-v-6b87e69f><div class="aside" data-v-6b87e69f><div class="aside-curtain" data-v-6b87e69f></div><div class="aside-container" data-v-6b87e69f><div class="aside-content" data-v-6b87e69f><div class="VPDocAside" data-v-6b87e69f data-v-3f215769><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline" role="navigation" data-v-3f215769 data-v-d330b1bb><div class="content" data-v-d330b1bb><div class="outline-marker" data-v-d330b1bb></div><div class="outline-title" role="heading" aria-level="2" data-v-d330b1bb>当前页</div><nav aria-labelledby="doc-outline-aria-label" data-v-d330b1bb><span class="visually-hidden" id="doc-outline-aria-label" data-v-d330b1bb> Table of Contents for current page </span><ul class="root" data-v-d330b1bb data-v-d0ee3533><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-6b87e69f><div class="content-container" data-v-6b87e69f><!--[--><!--]--><!----><main class="main" data-v-6b87e69f><div style="position:relative;" class="vp-doc _guide_routing external-link-icon-enabled" data-v-6b87e69f><div><h1 id="routing" tabindex="-1">路由 <a class="header-anchor" href="#routing" aria-label="Permalink to &quot;路由 {#routing}&quot;">​</a></h1><h2 id="file-based-routing" tabindex="-1">基于文件的路由 <a class="header-anchor" href="#file-based-routing" aria-label="Permalink to &quot;基于文件的路由 {#file-based-routing}&quot;">​</a></h2><p>VitePress 使用基于文件的路由，这意味着生成的 HTML 页面是从源 Markdown 文件的目录结构映射而来的。例如，给定以下目录结构：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">├─ guide</span></span>
<span class="line"><span style="color:#e1e4e8;">│  ├─ getting-started.md</span></span>
<span class="line"><span style="color:#e1e4e8;">│  └─ index.md</span></span>
<span class="line"><span style="color:#e1e4e8;">├─ index.md</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ prologue.md</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">├─ guide</span></span>
<span class="line"><span style="color:#24292e;">│  ├─ getting-started.md</span></span>
<span class="line"><span style="color:#24292e;">│  └─ index.md</span></span>
<span class="line"><span style="color:#24292e;">├─ index.md</span></span>
<span class="line"><span style="color:#24292e;">└─ prologue.md</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><p>生成的 HTML 页面会是这样：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">index.md                  --&gt;  /index.html (可以通过 / 访问)</span></span>
<span class="line"><span style="color:#e1e4e8;">prologue.md               --&gt;  /prologue.html</span></span>
<span class="line"><span style="color:#e1e4e8;">guide/index.md            --&gt;  /guide/index.html (可以通过 /guide/ 访问)</span></span>
<span class="line"><span style="color:#e1e4e8;">guide/getting-started.md  --&gt;  /guide/getting-started.html</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">index.md                  --&gt;  /index.html (可以通过 / 访问)</span></span>
<span class="line"><span style="color:#24292e;">prologue.md               --&gt;  /prologue.html</span></span>
<span class="line"><span style="color:#24292e;">guide/index.md            --&gt;  /guide/index.html (可以通过 /guide/ 访问)</span></span>
<span class="line"><span style="color:#24292e;">guide/getting-started.md  --&gt;  /guide/getting-started.html</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>生成的 HTML 可以托管在任何可以提供静态文件的 Web 服务器上。</p><h2 id="root-and-source-directory" tabindex="-1">根目录和源目录 <a class="header-anchor" href="#root-and-source-directory" aria-label="Permalink to &quot;根目录和源目录 {#root-and-source-directory}&quot;">​</a></h2><p>VitePress 项目的文件结构中有两个重要的概念：项目根目录 (<strong>project root</strong>) 和源目录 (<strong>source directory</strong>)。</p><h3 id="project-root" tabindex="-1">项目根目录 <a class="header-anchor" href="#project-root" aria-label="Permalink to &quot;项目根目录 {#project-root}&quot;">​</a></h3><p>项目根目录是 VitePress 将尝试寻找 <code>.vitepress</code> 特殊目录的地方。 <code>.vitepress</code> 目录是 VitePress 配置文件、开发服务器缓存、构建输出和可选主题自定义代码的预留位置。</p><p>当你从命令行运行 <code>vitepress dev</code> 或 <code>vitepress build</code> 时，VitePress 将使用当前工作目录作为项目根目录。要将子目录指定为根目录，你需要将相对路径传递给命令。例如，如果你的 VitePress 项目位于 <code>./docs</code>，你应该运行 <code>vitepress dev docs</code>：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">├─ docs                    # project root</span></span>
<span class="line"><span style="color:#e1e4e8;">│  ├─ .vitepress           # config dir</span></span>
<span class="line"><span style="color:#e1e4e8;">│  ├─ getting-started.md</span></span>
<span class="line"><span style="color:#e1e4e8;">│  └─ index.md</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ ...</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">├─ docs                    # project root</span></span>
<span class="line"><span style="color:#24292e;">│  ├─ .vitepress           # config dir</span></span>
<span class="line"><span style="color:#24292e;">│  ├─ getting-started.md</span></span>
<span class="line"><span style="color:#24292e;">│  └─ index.md</span></span>
<span class="line"><span style="color:#24292e;">└─ ...</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><div class="language-sh vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#B392F0;">vitepress</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">dev</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">docs</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6F42C1;">vitepress</span><span style="color:#24292E;"> </span><span style="color:#032F62;">dev</span><span style="color:#24292E;"> </span><span style="color:#032F62;">docs</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div><p>这将导致以下源代码到 HTML 的映射：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">docs/index.md            --&gt;  /index.html (可以通过 / 访问)</span></span>
<span class="line"><span style="color:#e1e4e8;">docs/getting-started.md  --&gt;  /getting-started.html</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">docs/index.md            --&gt;  /index.html (可以通过 / 访问)</span></span>
<span class="line"><span style="color:#24292e;">docs/getting-started.md  --&gt;  /getting-started.html</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h3 id="source-directory" tabindex="-1">源目录 <a class="header-anchor" href="#source-directory" aria-label="Permalink to &quot;源目录 {#source-directory}&quot;">​</a></h3><p>源目录是你的 Markdown 源文件所在的位置。默认情况下，它与项目根目录相同。但是，你可以通过 <a href="./../examples/md/site-config#srcdir"><code>srcDir</code></a> 配置选项对其进行配置。</p><p><code>srcDir</code> 选项是相对于项目根目录解析的。例如，对于 <code>srcDir: &#39;src&#39;</code>，你的文件结构将如下所示：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.                                # project root</span></span>
<span class="line"><span style="color:#e1e4e8;">├─ .vitepress             # config dir</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ src                      # source dir</span></span>
<span class="line"><span style="color:#e1e4e8;">   ├─ getting-started.md</span></span>
<span class="line"><span style="color:#e1e4e8;">   └─ index.md</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.                                # project root</span></span>
<span class="line"><span style="color:#24292e;">├─ .vitepress             # config dir</span></span>
<span class="line"><span style="color:#24292e;">└─ src                      # source dir</span></span>
<span class="line"><span style="color:#24292e;">   ├─ getting-started.md</span></span>
<span class="line"><span style="color:#24292e;">   └─ index.md</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>生成的源代码到 HTML 的映射：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">src/index.md            --&gt;  /index.html (可以通过 / 访问)</span></span>
<span class="line"><span style="color:#e1e4e8;">src/getting-started.md  --&gt;  /getting-started.html</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">src/index.md            --&gt;  /index.html (可以通过 / 访问)</span></span>
<span class="line"><span style="color:#24292e;">src/getting-started.md  --&gt;  /getting-started.html</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><h2 id="linking-between-pages" tabindex="-1">链接页面 <a class="header-anchor" href="#linking-between-pages" aria-label="Permalink to &quot;链接页面 {#linking-between-pages}&quot;">​</a></h2><p>在页面之间链接时，你可以使用绝对路径和相对路径。请注意，虽然 <code>.md</code> 和 <code>.html</code> 扩展名都可以使用，但最佳做法是省略文件扩展名，以便 VitePress 可以根据你的配置生成最终 URL。</p><div class="language-md vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#6A737D;">&lt;!-- 正确做法 --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">[</span><span style="color:#DBEDFF;text-decoration:underline;">Getting Started</span><span style="color:#E1E4E8;">](</span><span style="color:#E1E4E8;text-decoration:underline;">./getting-started</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;">[</span><span style="color:#DBEDFF;text-decoration:underline;">Getting Started</span><span style="color:#E1E4E8;">](</span><span style="color:#E1E4E8;text-decoration:underline;">../guide/getting-started</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">&lt;!-- 不正确做法 --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">[</span><span style="color:#DBEDFF;text-decoration:underline;">Getting Started</span><span style="color:#E1E4E8;">](</span><span style="color:#E1E4E8;text-decoration:underline;">./getting-started.md</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"><span style="color:#E1E4E8;">[</span><span style="color:#DBEDFF;text-decoration:underline;">Getting Started</span><span style="color:#E1E4E8;">](</span><span style="color:#E1E4E8;text-decoration:underline;">./getting-started.html</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6A737D;">&lt;!-- 正确做法 --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">[</span><span style="color:#032F62;text-decoration:underline;">Getting Started</span><span style="color:#24292E;">](</span><span style="color:#24292E;text-decoration:underline;">./getting-started</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;">[</span><span style="color:#032F62;text-decoration:underline;">Getting Started</span><span style="color:#24292E;">](</span><span style="color:#24292E;text-decoration:underline;">../guide/getting-started</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">&lt;!-- 不正确做法 --&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">[</span><span style="color:#032F62;text-decoration:underline;">Getting Started</span><span style="color:#24292E;">](</span><span style="color:#24292E;text-decoration:underline;">./getting-started.md</span><span style="color:#24292E;">)</span></span>
<span class="line"><span style="color:#24292E;">[</span><span style="color:#032F62;text-decoration:underline;">Getting Started</span><span style="color:#24292E;">](</span><span style="color:#24292E;text-decoration:underline;">./getting-started.html</span><span style="color:#24292E;">)</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><p>在<a href="./asset-handling">资源处理</a>中了解有关链接到资源（例如图像）的更多信息。</p><h2 id="generating-clean-url" tabindex="-1">生成简洁的 URL <a class="header-anchor" href="#generating-clean-url" aria-label="Permalink to &quot;生成简洁的 URL {#generating-clean-url}&quot;">​</a></h2><div class="warning custom-block"><p class="custom-block-title">需要服务器支持</p><p>要使用 VitePress 提供简洁 URL，需要服务器端支持。</p></div><p>默认情况下，VitePress 将入站链接解析为以 <code>.html</code> 结尾的 URL。但是，一些用户可能更喜欢没有 .html 扩展名的“简洁 URL” —— 例如，<code>example.com/path</code> 而不是 <code>example.com/path.html</code>。</p><p>某些服务器或托管平台（例如 Netlify 或 Vercel）提供将 <code>/foo</code> 之类的 URL 映射到 <code>/foo.html</code>（如果存在）的功能，而无需重定向：</p><ul><li>Netlify 默认支持这个。</li><li>Vercel 需要在 <a href="https://vercel.com/docs/concepts/projects/project-configuration#cleanurls" target="_blank" rel="noreferrer">vercel.json 中启用 cleanUrls 选项</a>。</li></ul><p>如果你可以使用此功能，你还可以启用 VitePress 自己的 <a href="./../examples/md/site-config#cleanurls"><code>cleanUrls</code></a> 配置选项，以便：</p><ul><li>页面之间的入站链接是在没有 <code>.html</code> 扩展名的情况下生成的。</li><li>如果当前路径以 <code>.html</code> 结尾，路由器将执行客户端重定向到无扩展路径。</li></ul><p>但是，如果你无法为服务器配置此类支持（例如 GitHub 页面），则必须手动采用以下目录结构：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">├─ getting-started</span></span>
<span class="line"><span style="color:#e1e4e8;">│  └─ index.md</span></span>
<span class="line"><span style="color:#e1e4e8;">├─ installation</span></span>
<span class="line"><span style="color:#e1e4e8;">│  └─ index.md</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ index.md</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">├─ getting-started</span></span>
<span class="line"><span style="color:#24292e;">│  └─ index.md</span></span>
<span class="line"><span style="color:#24292e;">├─ installation</span></span>
<span class="line"><span style="color:#24292e;">│  └─ index.md</span></span>
<span class="line"><span style="color:#24292e;">└─ index.md</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h2 id="route-rewrites" tabindex="-1">路由重写 <a class="header-anchor" href="#route-rewrites" aria-label="Permalink to &quot;路由重写 {#route-rewrites}&quot;">​</a></h2><p>你可以自定义源目录结构和生成页面之间的映射。当你有一个复杂的项目结构时，它很有用。例如，假设你有一个包含多个包的 monorepo，并且希望将文档与源文件一起放置，如下所示：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">├─ packages</span></span>
<span class="line"><span style="color:#e1e4e8;">│  ├─ pkg-a</span></span>
<span class="line"><span style="color:#e1e4e8;">│  │  └─ src</span></span>
<span class="line"><span style="color:#e1e4e8;">│  │      ├─ pkg-a-code.ts</span></span>
<span class="line"><span style="color:#e1e4e8;">│  │      └─ pkg-a-docs.md</span></span>
<span class="line"><span style="color:#e1e4e8;">│  └─ pkg-b</span></span>
<span class="line"><span style="color:#e1e4e8;">│     └─ src</span></span>
<span class="line"><span style="color:#e1e4e8;">│         ├─ pkg-b-code.ts</span></span>
<span class="line"><span style="color:#e1e4e8;">│         └─ pkg-b-docs.md</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">├─ packages</span></span>
<span class="line"><span style="color:#24292e;">│  ├─ pkg-a</span></span>
<span class="line"><span style="color:#24292e;">│  │  └─ src</span></span>
<span class="line"><span style="color:#24292e;">│  │      ├─ pkg-a-code.ts</span></span>
<span class="line"><span style="color:#24292e;">│  │      └─ pkg-a-docs.md</span></span>
<span class="line"><span style="color:#24292e;">│  └─ pkg-b</span></span>
<span class="line"><span style="color:#24292e;">│     └─ src</span></span>
<span class="line"><span style="color:#24292e;">│         ├─ pkg-b-code.ts</span></span>
<span class="line"><span style="color:#24292e;">│         └─ pkg-b-docs.md</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br></div></div><p>你希望像这样生成 VitePress 页面：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">packages/pkg-a/src/pkg-a-docs.md  --&gt;  /pkg-a/index.html</span></span>
<span class="line"><span style="color:#e1e4e8;">packages/pkg-b/src/pkg-b-docs.md  --&gt;  /pkg-b/index.html</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">packages/pkg-a/src/pkg-a-docs.md  --&gt;  /pkg-a/index.html</span></span>
<span class="line"><span style="color:#24292e;">packages/pkg-b/src/pkg-b-docs.md  --&gt;  /pkg-b/index.html</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>你可以通过像这样配置 <a href="./../examples/md/site-config#rewrites"><code>rewrites</code></a> 选项来实现此目的：</p><div class="language-ts vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#6A737D;">// .vitepress/config.js</span></span>
<span class="line"><span style="color:#F97583;">export</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">default</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">	rewrites: {</span></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#9ECBFF;">&#39;packages/pkg-a/src/pkg-a-docs.md&#39;</span><span style="color:#E1E4E8;">: </span><span style="color:#9ECBFF;">&#39;pkg-a/index.md&#39;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#9ECBFF;">&#39;packages/pkg-b/src/pkg-b-docs.md&#39;</span><span style="color:#E1E4E8;">: </span><span style="color:#9ECBFF;">&#39;pkg-b/index.md&#39;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"><span style="color:#E1E4E8;">	},</span></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6A737D;">// .vitepress/config.js</span></span>
<span class="line"><span style="color:#D73A49;">export</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">default</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">	rewrites: {</span></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#032F62;">&#39;packages/pkg-a/src/pkg-a-docs.md&#39;</span><span style="color:#24292E;">: </span><span style="color:#032F62;">&#39;pkg-a/index.md&#39;</span><span style="color:#24292E;">,</span></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#032F62;">&#39;packages/pkg-b/src/pkg-b-docs.md&#39;</span><span style="color:#24292E;">: </span><span style="color:#032F62;">&#39;pkg-b/index.md&#39;</span><span style="color:#24292E;">,</span></span>
<span class="line"><span style="color:#24292E;">	},</span></span>
<span class="line"><span style="color:#24292E;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><p><code>rewrites</code> 选项还支持动态路由参数。在上面的示例中，如果你有很多包，则列出所有路径会很冗长。鉴于它们都具有相同的文件结构，你可以像这样简化配置：</p><div class="language-ts vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">export</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">default</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">	rewrites: {</span></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#9ECBFF;">&#39;packages/:pkg/src/(.*)&#39;</span><span style="color:#E1E4E8;">: </span><span style="color:#9ECBFF;">&#39;:pkg/index.md&#39;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"><span style="color:#E1E4E8;">	},</span></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">export</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">default</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">	rewrites: {</span></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#032F62;">&#39;packages/:pkg/src/(.*)&#39;</span><span style="color:#24292E;">: </span><span style="color:#032F62;">&#39;:pkg/index.md&#39;</span><span style="color:#24292E;">,</span></span>
<span class="line"><span style="color:#24292E;">	},</span></span>
<span class="line"><span style="color:#24292E;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>重写路径是使用 <code>path-to-regexp</code> 包编译的 - 请参阅<a href="https://github.com/pillarjs/path-to-regexp#parameters" target="_blank" rel="noreferrer">其文档</a>以获取更高级的语法。</p><div class="warning custom-block"><p class="custom-block-title">开启重写功能时使用相对链接</p><p>启用重写后，<strong>相对链接应基于重写的路径</strong>。例如，为了创建从 <code>packages/pkg-a/src/pkg-a-code.md</code> 到 <code>packages/pkg-b/src/pkg-b-code.md</code> 的相对链接，你应该使用：</p><div class="language-md vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">[</span><span style="color:#DBEDFF;text-decoration:underline;">Link to PKG B</span><span style="color:#E1E4E8;">](</span><span style="color:#E1E4E8;text-decoration:underline;">../pkg-b/pkg-b-code</span><span style="color:#E1E4E8;">)</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">[</span><span style="color:#032F62;text-decoration:underline;">Link to PKG B</span><span style="color:#24292E;">](</span><span style="color:#24292E;text-decoration:underline;">../pkg-b/pkg-b-code</span><span style="color:#24292E;">)</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div></div><h2 id="dynamic-routes" tabindex="-1">动态路由 <a class="header-anchor" href="#dynamic-routes" aria-label="Permalink to &quot;动态路由 {#dynamic-routes}&quot;">​</a></h2><p>你可以使用单个 Markdown 文件和动态数据生成许多页面。例如，你可以创建一个 <code>packages/[pkg].md</code> 文件，为项目中的每个包生成相应的页面。这里，<code>[pkg]</code> 段是一个路由参数，用于区分每个页面。</p><h3 id="paths-loader-file" tabindex="-1">路径加载文件 <a class="header-anchor" href="#paths-loader-file" aria-label="Permalink to &quot;路径加载文件 {#paths-loader-file}&quot;">​</a></h3><p>由于 VitePress 是静态站点生成器，因此<strong>必须</strong>在构建时确定可能的页面路径。因此，动态路由页面必须伴随<strong>路径加载文件</strong>。对于 <code>packages/[pkg].md</code>，我们需要 <code>packages/[pkg].paths.js</code>（也支持 <code>.ts</code>）：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ packages</span></span>
<span class="line"><span style="color:#e1e4e8;">   ├─ [pkg].md         # route template</span></span>
<span class="line"><span style="color:#e1e4e8;">   └─ [pkg].paths.js   # route paths loader</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">└─ packages</span></span>
<span class="line"><span style="color:#24292e;">   ├─ [pkg].md         # route template</span></span>
<span class="line"><span style="color:#24292e;">   └─ [pkg].paths.js   # route paths loader</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>路径加载器应该提供一个带有 <code>paths</code> 方法的对象作为其默认导出。 <code>paths</code> 方法应返回具有 <code>params</code> 属性的对象数组。这些对象中的每一个都将生成一个相应的页面。</p><p>给定以下 <code>paths</code> 数组：</p><div class="language-js vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#6A737D;">// packages/[pkg].paths.js</span></span>
<span class="line"><span style="color:#F97583;">export</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">default</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">	</span><span style="color:#B392F0;">paths</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> [{ params: { pkg: </span><span style="color:#9ECBFF;">&#39;foo&#39;</span><span style="color:#E1E4E8;"> } }, { params: { pkg: </span><span style="color:#9ECBFF;">&#39;bar&#39;</span><span style="color:#E1E4E8;"> } }]</span></span>
<span class="line"><span style="color:#E1E4E8;">	},</span></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6A737D;">// packages/[pkg].paths.js</span></span>
<span class="line"><span style="color:#D73A49;">export</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">default</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">	</span><span style="color:#6F42C1;">paths</span><span style="color:#24292E;">() {</span></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> [{ params: { pkg: </span><span style="color:#032F62;">&#39;foo&#39;</span><span style="color:#24292E;"> } }, { params: { pkg: </span><span style="color:#032F62;">&#39;bar&#39;</span><span style="color:#24292E;"> } }]</span></span>
<span class="line"><span style="color:#24292E;">	},</span></span>
<span class="line"><span style="color:#24292E;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><p>生成的 HTML 页面将会是：</p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ packages</span></span>
<span class="line"><span style="color:#e1e4e8;">   ├─ foo.html</span></span>
<span class="line"><span style="color:#e1e4e8;">   └─ bar.html</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">└─ packages</span></span>
<span class="line"><span style="color:#24292e;">   ├─ foo.html</span></span>
<span class="line"><span style="color:#24292e;">   └─ bar.html</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h3 id="multiple-params" tabindex="-1">多参数 <a class="header-anchor" href="#multiple-params" aria-label="Permalink to &quot;多参数 {#multiple-params}&quot;">​</a></h3><p>动态路由可以包含多个参数：</p><p><strong>File Structure</strong></p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ packages</span></span>
<span class="line"><span style="color:#e1e4e8;">   ├─ [pkg]-[version].md</span></span>
<span class="line"><span style="color:#e1e4e8;">   └─ [pkg]-[version].paths.js</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">└─ packages</span></span>
<span class="line"><span style="color:#24292e;">   ├─ [pkg]-[version].md</span></span>
<span class="line"><span style="color:#24292e;">   └─ [pkg]-[version].paths.js</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p><strong>路径加载器</strong></p><div class="language-js vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">export</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">default</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">	</span><span style="color:#B392F0;">paths</span><span style="color:#E1E4E8;">: () </span><span style="color:#F97583;">=&gt;</span><span style="color:#E1E4E8;"> [</span></span>
<span class="line"><span style="color:#E1E4E8;">		{ params: { pkg: </span><span style="color:#9ECBFF;">&#39;foo&#39;</span><span style="color:#E1E4E8;">, version: </span><span style="color:#9ECBFF;">&#39;1.0.0&#39;</span><span style="color:#E1E4E8;"> } },</span></span>
<span class="line"><span style="color:#E1E4E8;">		{ params: { pkg: </span><span style="color:#9ECBFF;">&#39;foo&#39;</span><span style="color:#E1E4E8;">, version: </span><span style="color:#9ECBFF;">&#39;2.0.0&#39;</span><span style="color:#E1E4E8;"> } },</span></span>
<span class="line"><span style="color:#E1E4E8;">		{ params: { pkg: </span><span style="color:#9ECBFF;">&#39;bar&#39;</span><span style="color:#E1E4E8;">, version: </span><span style="color:#9ECBFF;">&#39;1.0.0&#39;</span><span style="color:#E1E4E8;"> } },</span></span>
<span class="line"><span style="color:#E1E4E8;">		{ params: { pkg: </span><span style="color:#9ECBFF;">&#39;bar&#39;</span><span style="color:#E1E4E8;">, version: </span><span style="color:#9ECBFF;">&#39;2.0.0&#39;</span><span style="color:#E1E4E8;"> } },</span></span>
<span class="line"><span style="color:#E1E4E8;">	],</span></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">export</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">default</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">	</span><span style="color:#6F42C1;">paths</span><span style="color:#24292E;">: () </span><span style="color:#D73A49;">=&gt;</span><span style="color:#24292E;"> [</span></span>
<span class="line"><span style="color:#24292E;">		{ params: { pkg: </span><span style="color:#032F62;">&#39;foo&#39;</span><span style="color:#24292E;">, version: </span><span style="color:#032F62;">&#39;1.0.0&#39;</span><span style="color:#24292E;"> } },</span></span>
<span class="line"><span style="color:#24292E;">		{ params: { pkg: </span><span style="color:#032F62;">&#39;foo&#39;</span><span style="color:#24292E;">, version: </span><span style="color:#032F62;">&#39;2.0.0&#39;</span><span style="color:#24292E;"> } },</span></span>
<span class="line"><span style="color:#24292E;">		{ params: { pkg: </span><span style="color:#032F62;">&#39;bar&#39;</span><span style="color:#24292E;">, version: </span><span style="color:#032F62;">&#39;1.0.0&#39;</span><span style="color:#24292E;"> } },</span></span>
<span class="line"><span style="color:#24292E;">		{ params: { pkg: </span><span style="color:#032F62;">&#39;bar&#39;</span><span style="color:#24292E;">, version: </span><span style="color:#032F62;">&#39;2.0.0&#39;</span><span style="color:#24292E;"> } },</span></span>
<span class="line"><span style="color:#24292E;">	],</span></span>
<span class="line"><span style="color:#24292E;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><p><strong>输出</strong></p><div class="language- vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#e1e4e8;">.</span></span>
<span class="line"><span style="color:#e1e4e8;">└─ packages</span></span>
<span class="line"><span style="color:#e1e4e8;">   ├─ foo-1.0.0.html</span></span>
<span class="line"><span style="color:#e1e4e8;">   ├─ foo-2.0.0.html</span></span>
<span class="line"><span style="color:#e1e4e8;">   ├─ bar-1.0.0.html</span></span>
<span class="line"><span style="color:#e1e4e8;">   └─ bar-2.0.0.html</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292e;">.</span></span>
<span class="line"><span style="color:#24292e;">└─ packages</span></span>
<span class="line"><span style="color:#24292e;">   ├─ foo-1.0.0.html</span></span>
<span class="line"><span style="color:#24292e;">   ├─ foo-2.0.0.html</span></span>
<span class="line"><span style="color:#24292e;">   ├─ bar-1.0.0.html</span></span>
<span class="line"><span style="color:#24292e;">   └─ bar-2.0.0.html</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h3 id="dynamically-generating-paths" tabindex="-1">动态生成路径 <a class="header-anchor" href="#dynamically-generating-paths" aria-label="Permalink to &quot;动态生成路径 {#dynamically-generating-paths}&quot;">​</a></h3><p>路径加载器模块在 Node.js 中运行，并且仅在构建期间执行。你可以使用本地或远程的任何数据动态生成路径数组。</p><p>从本地文件生成路径：</p><div class="language-js vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">import</span><span style="color:#E1E4E8;"> fs </span><span style="color:#F97583;">from</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">&#39;fs&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">export</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">default</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">	</span><span style="color:#B392F0;">paths</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> fs.</span><span style="color:#B392F0;">readdirSync</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;packages&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">map</span><span style="color:#E1E4E8;">((</span><span style="color:#FFAB70;">pkg</span><span style="color:#E1E4E8;">) </span><span style="color:#F97583;">=&gt;</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">			</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> { params: { pkg } }</span></span>
<span class="line"><span style="color:#E1E4E8;">		})</span></span>
<span class="line"><span style="color:#E1E4E8;">	},</span></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">import</span><span style="color:#24292E;"> fs </span><span style="color:#D73A49;">from</span><span style="color:#24292E;"> </span><span style="color:#032F62;">&#39;fs&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">export</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">default</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">	</span><span style="color:#6F42C1;">paths</span><span style="color:#24292E;">() {</span></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> fs.</span><span style="color:#6F42C1;">readdirSync</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;packages&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">map</span><span style="color:#24292E;">((</span><span style="color:#E36209;">pkg</span><span style="color:#24292E;">) </span><span style="color:#D73A49;">=&gt;</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">			</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> { params: { pkg } }</span></span>
<span class="line"><span style="color:#24292E;">		})</span></span>
<span class="line"><span style="color:#24292E;">	},</span></span>
<span class="line"><span style="color:#24292E;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><p>从远程数据生成路径：</p><div class="language-js vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">export</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">default</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">	</span><span style="color:#F97583;">async</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">paths</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#F97583;">const</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">pkgs</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">await</span><span style="color:#E1E4E8;"> (</span><span style="color:#F97583;">await</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">fetch</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;https://my-api.com/packages&#39;</span><span style="color:#E1E4E8;">)).</span><span style="color:#B392F0;">json</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> pkgs.</span><span style="color:#B392F0;">map</span><span style="color:#E1E4E8;">((</span><span style="color:#FFAB70;">pkg</span><span style="color:#E1E4E8;">) </span><span style="color:#F97583;">=&gt;</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">			</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">				params: {</span></span>
<span class="line"><span style="color:#E1E4E8;">					pkg: pkg.name,</span></span>
<span class="line"><span style="color:#E1E4E8;">					version: pkg.version,</span></span>
<span class="line"><span style="color:#E1E4E8;">				},</span></span>
<span class="line"><span style="color:#E1E4E8;">			}</span></span>
<span class="line"><span style="color:#E1E4E8;">		})</span></span>
<span class="line"><span style="color:#E1E4E8;">	},</span></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">export</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">default</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">	</span><span style="color:#D73A49;">async</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">paths</span><span style="color:#24292E;">() {</span></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#D73A49;">const</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">pkgs</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">await</span><span style="color:#24292E;"> (</span><span style="color:#D73A49;">await</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">fetch</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;https://my-api.com/packages&#39;</span><span style="color:#24292E;">)).</span><span style="color:#6F42C1;">json</span><span style="color:#24292E;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> pkgs.</span><span style="color:#6F42C1;">map</span><span style="color:#24292E;">((</span><span style="color:#E36209;">pkg</span><span style="color:#24292E;">) </span><span style="color:#D73A49;">=&gt;</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">			</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">				params: {</span></span>
<span class="line"><span style="color:#24292E;">					pkg: pkg.name,</span></span>
<span class="line"><span style="color:#24292E;">					version: pkg.version,</span></span>
<span class="line"><span style="color:#24292E;">				},</span></span>
<span class="line"><span style="color:#24292E;">			}</span></span>
<span class="line"><span style="color:#24292E;">		})</span></span>
<span class="line"><span style="color:#24292E;">	},</span></span>
<span class="line"><span style="color:#24292E;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h3 id="accessing-params-in-page" tabindex="-1">访问页面中的参数 <a class="header-anchor" href="#accessing-params-in-page" aria-label="Permalink to &quot;访问页面中的参数 {#accessing-params-in-page}&quot;">​</a></h3><p>你可以使用参数将附加数据传递到每个页面。 Markdown 路由文件可以通过 <code>$params</code> 全局属性访问 Vue 表达式中的当前页面参数：</p><div class="language-md vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#FFAB70;">-</span><span style="color:#E1E4E8;"> package name: {{ $params.pkg }}</span></span>
<span class="line"><span style="color:#FFAB70;">-</span><span style="color:#E1E4E8;"> version: {{ $params.version }}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#E36209;">-</span><span style="color:#24292E;"> package name: {{ $params.pkg }}</span></span>
<span class="line"><span style="color:#E36209;">-</span><span style="color:#24292E;"> version: {{ $params.version }}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>你还可以通过 <a href="./../examples/md/runtime-api#usedata"><code>useData</code></a> runtime API 访问当前页面的参数。这在 Markdown 文件和 Vue 组件中都可用：</p><div class="language-vue vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">vue</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">&lt;</span><span style="color:#85E89D;">script</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">setup</span><span style="color:#E1E4E8;">&gt;</span></span>
<span class="line"><span style="color:#F97583;">import</span><span style="color:#E1E4E8;"> { useData } </span><span style="color:#F97583;">from</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">&#39;vitepress&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">// params is a Vue ref</span></span>
<span class="line"><span style="color:#F97583;">const</span><span style="color:#E1E4E8;"> { </span><span style="color:#79B8FF;">params</span><span style="color:#E1E4E8;"> } </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">useData</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">console.</span><span style="color:#B392F0;">log</span><span style="color:#E1E4E8;">(params.value)</span></span>
<span class="line"><span style="color:#E1E4E8;">&lt;/</span><span style="color:#85E89D;">script</span><span style="color:#E1E4E8;">&gt;</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;">&lt;</span><span style="color:#22863A;">script</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">setup</span><span style="color:#24292E;">&gt;</span></span>
<span class="line"><span style="color:#D73A49;">import</span><span style="color:#24292E;"> { useData } </span><span style="color:#D73A49;">from</span><span style="color:#24292E;"> </span><span style="color:#032F62;">&#39;vitepress&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">// params is a Vue ref</span></span>
<span class="line"><span style="color:#D73A49;">const</span><span style="color:#24292E;"> { </span><span style="color:#005CC5;">params</span><span style="color:#24292E;"> } </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">useData</span><span style="color:#24292E;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">console.</span><span style="color:#6F42C1;">log</span><span style="color:#24292E;">(params.value)</span></span>
<span class="line"><span style="color:#24292E;">&lt;/</span><span style="color:#22863A;">script</span><span style="color:#24292E;">&gt;</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><h3 id="rendering-raw-content" tabindex="-1">渲染原始内容 <a class="header-anchor" href="#rendering-raw-content" aria-label="Permalink to &quot;渲染原始内容 {#rendering-raw-content}&quot;">​</a></h3><p>传递给页面的参数将在客户端 JavaScript payload 中序列化，因此你应该避免在参数中传递大量数据，例如从远程 CMS 获取的原始 Markdown 或 HTML 内容。</p><p>相反，你可以使用每个路径对象上的 <code>content</code> 属性将此类内容传递到每个页面：</p><div class="language-js vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">export</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">default</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">	</span><span style="color:#F97583;">async</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">paths</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#F97583;">const</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">posts</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">await</span><span style="color:#E1E4E8;"> (</span><span style="color:#F97583;">await</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">fetch</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;https://my-cms.com/blog-posts&#39;</span><span style="color:#E1E4E8;">)).</span><span style="color:#B392F0;">json</span><span style="color:#E1E4E8;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">		</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> posts.</span><span style="color:#B392F0;">map</span><span style="color:#E1E4E8;">((</span><span style="color:#FFAB70;">post</span><span style="color:#E1E4E8;">) </span><span style="color:#F97583;">=&gt;</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">			</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"><span style="color:#E1E4E8;">				params: { id: post.id },</span></span>
<span class="line"><span style="color:#E1E4E8;">				content: post.content, </span><span style="color:#6A737D;">// raw Markdown or HTML</span></span>
<span class="line"><span style="color:#E1E4E8;">			}</span></span>
<span class="line"><span style="color:#E1E4E8;">		})</span></span>
<span class="line"><span style="color:#E1E4E8;">	},</span></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">export</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">default</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">	</span><span style="color:#D73A49;">async</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">paths</span><span style="color:#24292E;">() {</span></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#D73A49;">const</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">posts</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">await</span><span style="color:#24292E;"> (</span><span style="color:#D73A49;">await</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">fetch</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;https://my-cms.com/blog-posts&#39;</span><span style="color:#24292E;">)).</span><span style="color:#6F42C1;">json</span><span style="color:#24292E;">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">		</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> posts.</span><span style="color:#6F42C1;">map</span><span style="color:#24292E;">((</span><span style="color:#E36209;">post</span><span style="color:#24292E;">) </span><span style="color:#D73A49;">=&gt;</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">			</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> {</span></span>
<span class="line"><span style="color:#24292E;">				params: { id: post.id },</span></span>
<span class="line"><span style="color:#24292E;">				content: post.content, </span><span style="color:#6A737D;">// raw Markdown or HTML</span></span>
<span class="line"><span style="color:#24292E;">			}</span></span>
<span class="line"><span style="color:#24292E;">		})</span></span>
<span class="line"><span style="color:#24292E;">	},</span></span>
<span class="line"><span style="color:#24292E;">}</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><p>然后，使用以下特殊语法将内容呈现为 Markdown 文件本身的一部分：</p><div class="language-md vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#6A737D;">&lt;!-- @content --&gt;</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6A737D;">&lt;!-- @content --&gt;</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br></div></div></div></div></main><footer class="VPDocFooter" data-v-6b87e69f data-v-ef5dee53><!--[--><!--]--><div class="edit-info" data-v-ef5dee53><div class="edit-link" data-v-ef5dee53><a class="VPLink link vp-external-link-icon no-icon edit-link-button" href="https://github.com/vanchKong/VitePressCN/edit/main/docs/guide/routing.md" target="_blank" rel="noreferrer" data-v-ef5dee53><!--[--><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="edit-link-icon" aria-label="edit icon" data-v-ef5dee53><path d="M18,23H4c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h7c0.6,0,1,0.4,1,1s-0.4,1-1,1H4C3.4,5,3,5.4,3,6v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1v-7c0-0.6,0.4-1,1-1s1,0.4,1,1v7C21,21.7,19.7,23,18,23z"></path><path d="M8,17c-0.3,0-0.5-0.1-0.7-0.3C7,16.5,6.9,16.1,7,15.8l1-4c0-0.2,0.1-0.3,0.3-0.5l9.5-9.5c1.2-1.2,3.2-1.2,4.4,0c1.2,1.2,1.2,3.2,0,4.4l-9.5,9.5c-0.1,0.1-0.3,0.2-0.5,0.3l-4,1C8.2,17,8.1,17,8,17zM9.9,12.5l-0.5,2.1l2.1-0.5l9.3-9.3c0.4-0.4,0.4-1.1,0-1.6c-0.4-0.4-1.2-0.4-1.6,0l0,0L9.9,12.5z M18.5,2.5L18.5,2.5L18.5,2.5z"></path></svg> 在GitHub上编辑此页<!--]--></a></div><!----></div><nav class="prev-next" data-v-ef5dee53><div class="pager" data-v-ef5dee53><a class="pager-link prev" href="/guide/getting-started" data-v-ef5dee53><span class="desc" data-v-ef5dee53>上一篇</span><span class="title" data-v-ef5dee53>使用安装</span></a></div><div class="pager" data-v-ef5dee53><a class="pager-link next" href="/guide/sitemap-generation" data-v-ef5dee53><span class="desc" data-v-ef5dee53>下一篇</span><span class="title" data-v-ef5dee53>按需引入</span></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5a346dfe data-v-e03eb2e1><div class="container" data-v-e03eb2e1><p class="message" data-v-e03eb2e1>Released under the MIT License.</p><p class="copyright" data-v-e03eb2e1>Copyright 2023 www.56jzt.com</p></div></footer><!--[--><!--]--></div></div>
    <script>window.__VP_HASH_MAP__=JSON.parse("{\"examples_md_default-theme-footer.md\":\"4c8afdbd\",\"readme.md\":\"5d3c33ea\",\"examples_md_cli.md\":\"c73cd1be\",\"guide_demo-button.md\":\"4a8d5d4f\",\"examples_md_team.md\":\"19fcceea\",\"examples_md_default-theme-last-updated.md\":\"d168b138\",\"guide_cms.md\":\"c87e0998\",\"examples_md_default-theme-team-page.md\":\"81ecf5fd\",\"guide_migration-from-vitepress-0.md\":\"a9ec5ec4\",\"examples_md_frontmatter-config.md\":\"4118570a\",\"guide_deploy.md\":\"bcb72ef1\",\"examples_md_default-theme-edit-link.md\":\"24c88a65\",\"examples_md_default-theme-layout.md\":\"9db32ddd\",\"examples_md_default-theme-nav.md\":\"163472c8\",\"index.md\":\"f1c49fc9\",\"guide_what-is-vitepress.md\":\"ed98d1c4\",\"guide_markdown-base.md\":\"d2a42559\",\"examples_md_default-theme-carbon-ads.md\":\"2bf745b5\",\"guide_asset-handling.md\":\"7559e329\",\"examples_md_default-theme-home-page.md\":\"146eea41\",\"api-examples.md\":\"9c024793\",\"examples_md_default-theme-prev-next-links.md\":\"02be0bc3\",\"examples_md_default-theme-search.md\":\"64dd3a5c\",\"versionlog_v1.0.1.md\":\"fbaa2430\",\"guide_using-vue.md\":\"5c41f617\",\"markdown-examples.md\":\"16c217af\",\"versionlog_v1.0.0.md\":\"676fa2b0\",\"versionlog_v1.0.2.md\":\"1191b553\",\"guide_data-loading.md\":\"75b38ad5\",\"guide_sitemap-generation.md\":\"2ab6510e\",\"guide_migration-from-vuepress.md\":\"1548f7ea\",\"guide_extending-default-theme.md\":\"bda7ecd8\",\"guide_i18n.md\":\"d78c79a7\",\"examples_md_site-config.md\":\"b89a013d\",\"examples_md_runtime-api.md\":\"fcb02c2a\",\"examples_md_default-theme-sidebar.md\":\"02e3db56\",\"examples_md_default-theme-badge.md\":\"0b59ca30\",\"guide_mpa-mode.md\":\"6f9bc7f9\",\"guide_frontmatter.md\":\"1ab639ee\",\"guide_getting-started.md\":\"38d77576\",\"examples_md_default-theme-config.md\":\"3e21dc9f\",\"guide_routing.md\":\"aed61575\",\"guide_custom-theme.md\":\"64c16a6e\",\"guide_ssr-compat.md\":\"292538a0\",\"guide_markdown.md\":\"09458916\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"九州通物流\",\"description\":\"Vite & Vue 驱动的静态站点生成器\",\"base\":\"/\",\"head\":[],\"appearance\":true,\"themeConfig\":{\"lastUpdated\":{\"text\":\"最近更新时间\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"medium\"}},\"darkModeSwitchLabel\":\"主题\",\"sidebarMenuLabel\":\"菜单\",\"returnToTopLabel\":\"回到顶部\",\"langMenuLabel\":\"多语言\",\"externalLinkIcon\":true,\"outlineTitle\":\"当前页\",\"logo\":\"/logo.ico\",\"siteTitle\":\"云仓组件库\",\"docFooter\":{\"prev\":\"上一篇\",\"next\":\"下一篇\"},\"nav\":[{\"text\":\"接入指南\",\"link\":\"/guide/what-is-vitepress\",\"activeMatch\":\"/guide/\"},{\"text\":\"组件配置\",\"link\":\"/examples/md/site-config\",\"activeMatch\":\"/examples/\"},{\"text\":\"版本日志\",\"link\":\"/versionLog/v1.0.2\",\"activeMatch\":\"/versionLog/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"介绍\",\"collapsed\":true,\"items\":[{\"text\":\"设计初衷\",\"link\":\"/guide/what-is-vitepress\"},{\"text\":\"使用安装\",\"link\":\"/guide/getting-started\"},{\"text\":\"快速开始\",\"link\":\"/guide/routing\"},{\"text\":\"按需引入\",\"link\":\"/guide/sitemap-generation\"}]},{\"text\":\"本地开发\",\"collapsed\":true,\"items\":[{\"text\":\"编写新组件\",\"link\":\"/guide/markdown-base\"},{\"text\":\"编写测试用例\",\"link\":\"/guide/markdown\"},{\"text\":\"编写API文档\",\"link\":\"/guide/asset-handling\"},{\"text\":\"修改版本号\",\"link\":\"/guide/frontmatter\"},{\"text\":\"打包构建组件库\",\"link\":\"/guide/using-vue\"},{\"text\":\"上传组件库到npm仓库\",\"link\":\"/guide/i18n\"},{\"text\":\"更新组件文档\",\"link\":\"/guide/i18n\"}]},{\"text\":\"组件示例 & API 参考\",\"link\":\"/examples/md/site-config\"}],\"/examples/\":[{\"text\":\"参考\",\"items\":[{\"text\":\"站点配置\",\"link\":\"/examples/md/site-config\"},{\"text\":\"Frontmatter 配置\",\"link\":\"/examples/md/frontmatter-config\"},{\"text\":\"Runtime API\",\"link\":\"/examples/md/runtime-api\"},{\"text\":\"CLI\",\"link\":\"/examples/md/cli\"},{\"text\":\"默认主题\",\"items\":[{\"text\":\"概览\",\"link\":\"/examples/md/default-theme-config\"},{\"text\":\"导航栏\",\"link\":\"/examples/md/default-theme-nav\"},{\"text\":\"侧边栏\",\"link\":\"/examples/md/default-theme-sidebar\"},{\"text\":\"主页\",\"link\":\"/examples/md/default-theme-home-page\"},{\"text\":\"页脚\",\"link\":\"/examples/md/default-theme-footer\"},{\"text\":\"布局\",\"link\":\"/examples/md/default-theme-layout\"},{\"text\":\"徽标\",\"link\":\"/examples/md/default-theme-badge\"},{\"text\":\"团队\",\"link\":\"/examples/md/default-theme-team-page\"},{\"text\":\"上（下）一篇\",\"link\":\"/examples/md/default-theme-prev-next-links\"},{\"text\":\"编辑链接\",\"link\":\"/examples/md/default-theme-edit-link\"},{\"text\":\"最近更新时间\",\"link\":\"/examples/md/default-theme-last-updated\"},{\"text\":\"搜索\",\"link\":\"/examples/md/default-theme-search\"},{\"text\":\"Carbon Ads\",\"link\":\"/examples/md/default-theme-carbon-ads\"}]}]}],\"/versionLog/\":[{\"text\":\"日志\",\"items\":[{\"text\":\"v1.0.2\",\"link\":\"/versionLog/v1.0.2\"},{\"text\":\"v1.0.1\",\"link\":\"/versionLog/v1.0.1\"},{\"text\":\"v1.0.0\",\"link\":\"/versionLog/v1.0.0\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/vanchKong/VitePressCN\"}],\"editLink\":{\"text\":\"在GitHub上编辑此页\",\"pattern\":\"https://github.com/vanchKong/VitePressCN/edit/main/docs/:path\"},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright 2023 www.56jzt.com\"},\"search\":{\"provider\":\"local\"}},\"locales\":{},\"scrollOffset\":90,\"cleanUrls\":true}");</script>
    
  </body>
</html>